package frame;

import java.awt.Color;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JLabel;

/**
 *
 * @author mageia
 */
public class Frame extends javax.swing.JFrame {

    private String symbol;
    private boolean pari;
    private int contoMosse;
// Assegnamento azioni per specifici eventi tastiera.
    private class Tasti extends KeyAdapter {

        public void keyPressed(KeyEvent e) {
            switch (e.getKeyCode()) {
                case KeyEvent.VK_N:
                    reset();
                    break;
                case KeyEvent.VK_ESCAPE:
                    close();
            }
        }
    }

    /** Creates new form GroundTable */
// Creazione istanze e componenti iniziali del gioco.
    public Frame() {
        this.symbol = "0";
        this.pari = true;
        this.contoMosse = 0;
        initComponents();
        addKeyListener(new Tasti());
    }

// Procedura di uscita
    public void close() {
        System.exit(0);
    }
// Procedura di reset gioco, la nuova prima mossa sarà assegnata al giocatore che ha perso la precedente partita.
    public void reset() {
        this.jLabel1.setForeground(new Color(51, 204, 0));
        this.jLabel2.setForeground(new Color(51, 204, 0));
        this.jLabel3.setForeground(new Color(51, 204, 0));
        this.jLabel4.setForeground(new Color(51, 204, 0));
        this.jLabel5.setForeground(new Color(51, 204, 0));
        this.jLabel6.setForeground(new Color(51, 204, 0));
        this.jLabel7.setForeground(new Color(51, 204, 0));
        this.jLabel8.setForeground(new Color(51, 204, 0));
        this.jLabel9.setForeground(new Color(51, 204, 0));
        this.jLabel1.setText("");
        this.jLabel2.setText("");
        this.jLabel3.setText("");
        this.jLabel4.setText("");
        this.jLabel5.setText("");
        this.jLabel6.setText("");
        this.jLabel7.setText("");
        this.jLabel8.setText("");
        this.jLabel9.setText("");
        this.jLabel10.setText(">command: waiting_for_player_" + this.symbol + ";");
        this.jLabel11.setText("[Starting process...]   Press ESC to close the window, 'n' to reset.");
        this.pari = true;
        this.contoMosse = 0;
    }

/* Procedura di decisione turno giocatore. Imposta il simbolo e il testo d'indicazione,
    dopo la mossa, chiama la procedura per il controllo di fine gioco senza vincitore. */
    public void addSymbol(JLabel scelta) {
        if (scelta.getText().equals("")) {
            scelta.setText(this.symbol);
            if (this.symbol.equals("0")) {
                this.symbol = "1";
            } else {
                this.symbol = "0";
            }
            this.jLabel10.setText(">command: waiting_for_player_" + this.symbol + ";");
            this.contoMosse++;
            if (this.contoMosse == 9) {
                checkPari();
            }
            if (this.contoMosse == 1) {
                this.jLabel11.setText("[working...]   Press ESC to close the window, 'n' to reset.");
            }
        }
    }

// Funzione di rilevamento tris per le tre riche della griglia.
    public boolean checkLine(int pNumberLine) {
        if (pNumberLine == 1) {
            if (this.jLabel1.getText().equals(this.jLabel2.getText()) && this.jLabel1.getText().equals(this.jLabel3.getText())) {
                this.winner();
                this.jLabel1.setForeground(new Color(153, 255, 153));
                this.jLabel2.setForeground(new Color(153, 255, 153));
                this.jLabel3.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        if (pNumberLine == 2) {
            if (this.jLabel4.getText().equals(this.jLabel5.getText()) && this.jLabel4.getText().equals(this.jLabel6.getText())) {
                this.winner();
                this.jLabel4.setForeground(new Color(153, 255, 153));
                this.jLabel5.setForeground(new Color(153, 255, 153));
                this.jLabel6.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        if (pNumberLine == 3) {
            if (this.jLabel7.getText().equals(this.jLabel8.getText()) && this.jLabel7.getText().equals(this.jLabel9.getText())) {
                this.winner();
                this.jLabel7.setForeground(new Color(153, 255, 153));
                this.jLabel8.setForeground(new Color(153, 255, 153));
                this.jLabel9.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        return false;
    }

//Funzione di rilevamento tris per le tre colonne della griglia.
    public boolean checkCol(int pNumberCol) {
        if (pNumberCol == 1) {
            if (this.jLabel1.getText().equals(this.jLabel4.getText()) && this.jLabel1.getText().equals(this.jLabel7.getText())) {
                this.winner();
                this.jLabel1.setForeground(new Color(153, 255, 153));
                this.jLabel4.setForeground(new Color(153, 255, 153));
                this.jLabel7.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        if (pNumberCol == 2) {
            if (this.jLabel2.getText().equals(this.jLabel5.getText()) && this.jLabel2.getText().equals(this.jLabel8.getText())) {
                this.winner();
                this.jLabel2.setForeground(new Color(153, 255, 153));
                this.jLabel5.setForeground(new Color(153, 255, 153));
                this.jLabel8.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        if (pNumberCol == 3) {
            if (this.jLabel3.getText().equals(this.jLabel6.getText()) && this.jLabel3.getText().equals(this.jLabel9.getText())) {
                this.winner();
                this.jLabel3.setForeground(new Color(153, 255, 153));
                this.jLabel6.setForeground(new Color(153, 255, 153));
                this.jLabel9.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        return false;
    }

    public void checkPari() {
        if (this.pari) {
            this.jLabel10.setText(">command_end: fine_della_partita... /no_winner;");
            this.jLabel11.setText("[stopped.]   Press ESC to close the window, 'n' to reset.");
        }
    }

//Funzione di rilevamento tris per le due diagonali della griglia.
    public boolean checkDiagonal(int pNumberDiagonal) {
        if (pNumberDiagonal == 1) {
            if (this.jLabel1.getText().equals(this.jLabel5.getText()) && this.jLabel1.getText().equals(this.jLabel9.getText())) {
                this.winner();
                this.jLabel1.setForeground(new Color(153, 255, 153));
                this.jLabel5.setForeground(new Color(153, 255, 153));
                this.jLabel9.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        if (pNumberDiagonal == 2) {
            if (this.jLabel3.getText().equals(this.jLabel5.getText()) && this.jLabel3.getText().equals(this.jLabel7.getText())) {
                this.winner();
                this.jLabel3.setForeground(new Color(153, 255, 153));
                this.jLabel5.setForeground(new Color(153, 255, 153));
                this.jLabel7.setForeground(new Color(153, 255, 153));
                return true;
            }
            return false;
        }
        return false;
    }

// Procedura che determina e visualizza il giocatore vincente. Disabilitazione griglia.
    private void winner() {
        String winner = "1";
        if (this.symbol.equals("1")) {
            winner = "0";
        }
        this.jLabel10.setText(">return: tris_of_" + winner + "!;                                            (:");
        this.jLabel11.setText("[end.]   Press ESC to close the window, 'n' to reset.");
        if (this.jLabel1.getText().equals("")) {
            this.jLabel1.setText("-");
        }
        if (this.jLabel1.getText().equals("")) {
            this.jLabel1.setText("-");
        }
        if (this.jLabel2.getText().equals("")) {
            this.jLabel2.setText("-");
        }
        if (this.jLabel3.getText().equals("")) {
            this.jLabel3.setText("-");
        }
        if (this.jLabel4.getText().equals("")) {
            this.jLabel4.setText("-");
        }
        if (this.jLabel5.getText().equals("")) {
            this.jLabel5.setText("-");
        }
        if (this.jLabel6.getText().equals("")) {
            this.jLabel6.setText("-");
        }
        if (this.jLabel7.getText().equals("")) {
            this.jLabel7.setText("-");
        }
        if (this.jLabel8.getText().equals("")) {
            this.jLabel8.setText("-");
        }
        if (this.jLabel9.getText().equals("")) {
            this.jLabel9.setText("-");
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Mariangela's    t r i s");
        setAlwaysOnTop(true);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setFont(new java.awt.Font("Arial Black", 0, 10)); // NOI18N
        setForeground(new java.awt.Color(255, 0, 0));
        setResizable(false);

        jPanel1.setBackground(new java.awt.Color(0, 0, 0));
        jPanel1.setForeground(new java.awt.Color(255, 51, 0));
        jPanel1.setToolTipText("tris");

        jPanel2.setBackground(new java.awt.Color(0, 0, 0));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(51, 255, 0)), " t r i s ", javax.swing.border.TitledBorder.TRAILING, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Sylfaen", 1, 14), new java.awt.Color(153, 255, 153))); // NOI18N
        jPanel2.setForeground(new java.awt.Color(255, 51, 0));

        jPanel4.setBackground(new java.awt.Color(0, 0, 0));
        jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
        jPanel4.setLayout(new java.awt.GridLayout(3, 3));

        jLabel1.setBackground(new java.awt.Color(0, 0, 0));
        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24));
        jLabel1.setForeground(new java.awt.Color(51, 204, 0));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.black, java.awt.Color.black, new java.awt.Color(51, 204, 0), new java.awt.Color(0, 0, 0)));
        jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel1MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel1);

        jLabel2.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel2.setForeground(new java.awt.Color(51, 204, 0));
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.black, java.awt.Color.black, new java.awt.Color(51, 204, 0), new java.awt.Color(0, 0, 0)));
        jLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel2MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel2);

        jLabel3.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel3.setForeground(new java.awt.Color(51, 204, 0));
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel3MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel3);

        jLabel4.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel4.setForeground(new java.awt.Color(51, 204, 0));
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.black, java.awt.Color.black, new java.awt.Color(51, 255, 0), new java.awt.Color(51, 51, 51)));
        jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel4MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel4);

        jLabel5.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel5.setForeground(new java.awt.Color(51, 204, 0));
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel5MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel5);

        jLabel6.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel6.setForeground(new java.awt.Color(51, 204, 0));
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel6.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED, java.awt.Color.black, java.awt.Color.black, new java.awt.Color(0, 0, 0), new java.awt.Color(51, 204, 0)));
        jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel6MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel6);

        jLabel7.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel7.setForeground(new java.awt.Color(51, 204, 0));
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel7MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel7);

        jLabel8.setFont(new java.awt.Font("Lucida Console", 0, 24));
        jLabel8.setForeground(new java.awt.Color(51, 204, 0));
        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel8.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED, java.awt.Color.black, java.awt.Color.black, new java.awt.Color(0, 0, 0), new java.awt.Color(51, 204, 0)));
        jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel8MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel8);

        jLabel9.setFont(new java.awt.Font("Lucida Console", 0, 24)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(51, 204, 0));
        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel9.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(51, 204, 0), new java.awt.Color(0, 0, 0), java.awt.Color.black, java.awt.Color.black));
        jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel9MouseClicked(evt);
            }
        });
        jPanel4.add(jLabel9);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                .addContainerGap())
        );

        jLabel10.setFont(new java.awt.Font("Lucida Console", 0, 12)); // NOI18N
        jLabel10.setForeground(new java.awt.Color(51, 255, 0));
        jLabel10.setText(">command: waiting_for_player_0;");

        jLabel11.setFont(new java.awt.Font("Lucida Console", 0, 12)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(51, 255, 0));
        jLabel11.setText("[Starting process...]  Press ESC to close the window, 'n' to reset.");
        jLabel11.setVerticalAlignment(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(13, 13, 13)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 479, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(22, 22, 22))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(36, 36, 36)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel11)
                .addContainerGap(25, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>                        

// Procedure di controllo sulla mossa del giocatore corrente con invocazione delle funzioni di ricerca dei tris.
    private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel1);
        if (checkLine(1) || checkCol(1) || checkDiagonal(1)) {
            this.pari = false;
        }
    }                                    

    private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel2);
        if (checkLine(1) || checkCol(2)) {
            this.pari = false;
        }
    }                                    

    private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel3);
        if (checkLine(1) || checkCol(3) || checkDiagonal(2)) {
            this.pari = false;
        }
    }                                    

    private void jLabel4MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel4);
        if (checkLine(2) || checkCol(1)) {
            this.pari = false;
        }
    }                                    

    private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel5);
        if (checkLine(2) || checkCol(2) || checkDiagonal(1) || checkDiagonal(2)) {
            this.pari = false;
        }

    }                                    

    private void jLabel6MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel6);
        if (checkLine(2) || checkCol(3)) {
            this.pari = false;
        }
    }                                    

    private void jLabel7MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel7);
        if (checkLine(3) || checkCol(1) || checkDiagonal(2)) {
            this.pari = false;
        }
    }                                    

    private void jLabel8MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel8);
        if (checkLine(3) || checkCol(2)) {
            this.pari = false;
        }
    }                                    

    private void jLabel9MouseClicked(java.awt.event.MouseEvent evt) {                                     
        addSymbol(this.jLabel9);
        if (checkLine(3) || checkCol(3) || checkDiagonal(1)) {
            this.pari = false;
        }
    }                                    

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                Frame g = new Frame();
                g.setVisible(true);
                g.setLocation(150, 100);
            }
        });
    }
    // Variables declaration - do not modify                     
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    // End of variables declaration                   
}
